// import { Toaster } from "@/components/ui/toaster";
// import { Toaster as Sonner } from "@/components/ui/sonner";
// import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { RoleProvider } from "@/contexts/RoleContext";
import { LanguageProvider } from "@/contexts/LanguageContext";
import { MirrorAgent } from "@/components/MirrorAgent";

import Index from "./pages/Index";
import Discover from "./pages/Discover";
import Community from "./pages/Community";
import Profile from "./pages/Profile";
import NotFound from "./pages/NotFound";
import Team from "./pages/Team";
import Resources from "./pages/Resources";
import PBLWorkshop from "./pages/PBLWorkshop";
import SmartBuilder from "./pages/SmartBuilder";
import Analytics from "./pages/Analytics";
import Classroom from "./pages/Classroom";
import TemplateDetail from "./pages/TemplateDetail";
import WpsEdit from "./pages/WpsEdit";

const queryClient = new QueryClient();

const App = () => (
  <QueryClientProvider client={queryClient}>
    <LanguageProvider>
      <RoleProvider>
        {/* <TooltipProvider> */}
          {/* <Toaster /> */}
          {/* <Sonner /> */}
          <BrowserRouter>
            <Routes>
              <Route path="/" element={<Index />} />
              <Route path="/discover" element={<Discover />} />
              <Route path="/community" element={<Community />} />
              <Route path="/team" element={<Team />} />
              <Route path="/profile" element={<Profile />} />
              <Route path="/resources" element={<Resources />} />
              <Route path="/pbl-workshop" element={<PBLWorkshop />} />
              <Route path="/smart-builder" element={<SmartBuilder />} />
              <Route path="/analytics" element={<Analytics />} />
              <Route path="/classroom" element={<Classroom />} />
              <Route path="/template/:id" element={<TemplateDetail />} />
              <Route path="/wps-edit" element={<WpsEdit />} />
              <Route path="*" element={<NotFound />} />
            </Routes>
            <MirrorAgent />
          </BrowserRouter>
        {/* </TooltipProvider> */}
      </RoleProvider>
    </LanguageProvider>
  </QueryClientProvider>
);

export default App;
